/* 
 * Modbus app for RTU.
 * Copyright (c) 2012  apleilx
 * All rights reserved.
 * no limite
 */

/* ----------------------- Platform includes --------------------------------*/
#include "mbapp.h"
#include "osObjects.h"                                          // RTOS object definitions

	osEvent EventInfo;
	
	uint8_t mbCmdCnt;
/*****************************************************************************//*!
* @brief   	Slave device handle.
*               
* @param   none
*
* @return  none
*
* @ Pass/ Fail criteria: none
*****************************************************************************/    
void Modbus (void const *argument)
{
	
	mbCmdCnt = 0;
	mbInit( RTU_MASTER, MB_BAUD_9600 , MB_PAR_EVEN);
	mbCmdCnt = 0;
	
    for(;;)
	{
		if(mbState.bits.MasterMode)
		{
			osDelay(20);
		}
		else
		{
			
		}
		
    }
}



/*****************************************************************************//*!
* @brief   	Slave device handle.
*               
* @param   none
*
* @return  none
*
* @ Pass/ Fail criteria: none
*****************************************************************************/
void mbSlavePoll()
{
  
}


/*----------------------------------------------------------------------------*/

/*****************************************************************************//*!
* @brief   Master device handle.
*               
* @param   none
*
* @return  none
*
* @ Pass/ Fail criteria: none
*****************************************************************************/
void mbMasterPoll()
{
   
}


